package com.hanhai.zrb.backend.admin.dao.mybatis;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.hanhai.zrb.api.biz.dao.mybatis.base.BaseMapper;
import com.hanhai.zrb.backend.admin.model.dto.RoleDto;

public interface RoleDao extends BaseMapper {

	@Select("select * from role where id=#{id}")
	Map<String, Object> get(Integer id);

	@Select("select * from role")
	List<Map<String, Object>> listAll();

	void add(RoleDto params);

	@Update("update role set name=#{name},remark=#{remark} where id=#{id}")
	void update(RoleDto params);

	@Delete("delete from role where id=#{id}")
	void delete(Integer id);
}
